/*
 * @Author: wrh123 482597539@qq.com
 * @Date: 2024-01-18 20:28:21
 * @LastEditors: wrh123 482597539@qq.com
 * @LastEditTime: 2024-01-21 08:16:53
 * @FilePath: /vue-admin/src/api/Tradingacct.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import service from '@/utils/request'
// 交易账号的分页查询
export const pageQuery = (params) => {
    return service({ url: '/account/accountPage', method: 'get', params })
}

// 删除交易账户
export const deleteById = (id) => {
    return service({ url: `/account/deleteTbAccountById?id=${id}`, method: 'delete' })
}

// 新增交易账号
export const addSave = (data) => {
    return service({ url: '/account/insertAccount', method: 'post', data })
}

// 根据ID修改风控状态
export const updateStatus = (data) => {
    return service({ url: '/account/updateTbAccountFenKong', method: 'put', data })
}

// 根据ID修改密码
export const updatePwd = (data) => {
    return service({ url: '/account/updateTbAccountPassword', method: 'put', data })
}

// 录入人回显
export const getRecordUser = () => {
    return service({ url: '/dropdownbox/showAccountInputter', method: 'get' })
}

// 挑战项目回显
export const getChallengeProject = () => {
    return service({ url: '/dropdownbox/showAccountProject', method: 'get' })
}

// 交易账户类型的回显
export const getAccountType = () => {
    return service({ url: '/dropdownbox/showAccountType', method: 'get' })
}

// 确认修改备注
export const updateRemark = (params) => {
    return service({ url: `/RefundWithdraw/updateRefundRemark`, method: 'put', params })
}

// 获取用户的标签
export const getUserTagName = (id) => {
    return service({ url: `/accountMon/selectAccountTagNameById/` + id, method: 'get' })
}

// 获取用户下拉框的标签
export const getUserTagNameSelect = () => {
    return service({ url: `accountMon/selectAccountAllTagName`, method: 'get' })
}
// 修改客服操作
export function submitCustomers(data) {
    return service({
        url: '/RefundWithdraw/updateRefundType',
        method: 'post',
        data
    })
}

// 修改状态
export function submitStatus(data) {
    return service({
        url: '/account/updateTbAccountStatus',
        method: 'put',
        data
    })
}

//  日志
export function getLogs(id) {
    return service({
        url: `/account/selectTbAccountLog/${id}`,
        method: "get"
    })
}

// 
export function getTagName() {
    return service({
        url: "/account/selectTbAccountTagNamesAll",
        method: "get"
    })
}